package org.demo.vo.daomapping.bak;

import org.demo.vo.bean.Review;
import org.telosys.persistence.mapping.AttributeMapping;
import org.telosys.persistence.mapping.EntityMapping;

public class ReviewMapping extends EntityMapping<Review>
{
	private final static Class<Review> entityClass = Review.class ;

	private final static String   table   = "REVIEW" ;

	private final static String   schema  = null ;  // Can be null if not required by the database
	
	private final static AttributeMapping[] attributesMapping = new AttributeMapping[]
	{
		new AttributeMapping("customerCode",  "CUSTOMER_CODE",   PRIMARY_KEY,  NOT_GENERATED,  1 ),
		new AttributeMapping("bookId",        "BOOK_ID",         PRIMARY_KEY,  NOT_GENERATED,  2 ),
		
		new AttributeMapping("reviewText",  "REVIEW_TEXT",       NOT_PK,       NOT_GENERATED,  0 ),
		new AttributeMapping("reviewNote",  "REVIEW_NOTE",       NOT_PK,       NOT_GENERATED,  0 ),
		new AttributeMapping("creation",    "CREATION",          NOT_PK,       NOT_GENERATED,  0 ),
		new AttributeMapping("lastUpdate",  "LAST_UPDATE",       NOT_PK,       NOT_GENERATED,  0 )
	};
	
	public ReviewMapping() 
	{
		super(entityClass, table, schema, attributesMapping, null, null );
	}
	
}
